;==========================================================
;
;
;   ██████╗  ██████╗ ██╗  ██╗   ██╗██████╗  █████╗ ██████╗
;   ██╔══██╗██╔═══██╗██║  ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
;   ██████╔╝██║   ██║██║   ╚████╔╝ ██████╔╝███████║██████╔╝
;   ██╔═══╝ ██║   ██║██║    ╚██╔╝  ██╔══██╗██╔══██║██╔══██╗
;   ██║     ╚██████╔╝███████╗██║   ██████╔╝██║  ██║██║  ██║
;   ╚═╝      ╚═════╝ ╚══════╝╚═╝   ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝
;
;
;   To learn more about how to configure Polybar
;   go to https://github.com/polybar/polybar
;
;   The README contains a lot of information
;
;==========================================================

[colors]
;background = ${xrdb:color0:#222}
background = #333b46
background-alt = #ffffff
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #555
primary = #ff0066
secondary = #e60053
alert = #bd2c40

[bar/example]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 27
;offset-x = 0%
;offset-y = 0%
radius = 0.0
fixed-center = false

background = ${colors.background}
foreground = ${colors.foreground}

line-size = 2
line-color = #f00

border-size = 0
border-color = #00000000

padding-left = 2
padding-right = 5

module-margin-left = 1
module-margin-right = 2

font-0 = fixed:pixelsize=10;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = siji:pixelsize=10;1
font-3 = FontAwesome:pixelsize=12;1

modules-left = i3
modules-center = cmus
modules-right = pulseaudio xkeyboard date

#tray-position = right
#tray-padding = 2
;tray-background = #0063ff

;wm-restack = bspwm
;wm-restack = i3

;override-redirect = true

;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev

;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev

cursor-click = pointer
cursor-scroll = ns-resize

[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
blacklist-1 = caps lock

format-prefix = "  "
format-prefix-foreground = ${colors.background-alt}
format-prefix-underline = ${colors.background-alt}

label-layout = %layout%
label-layout-underline = ${colors.background-alt}

label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}

[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false

fuzzy-match = true

ws-icon-0 = 1;
ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
ws-icon-5 = 6;
ws-icon-6 = 7;
ws-icon-7 = 8;
ws-icon-8 = 9;

; Only show workspaces on the same output as the bar
pin-workspaces = true

label-mode-padding = 4
label-mode-foreground `= #000
label-mode-background = ${colors.primary}

; focused = Active workspace on focused monitor
label-focused = %icon%
label-focused-background = ${colors.background}
label-focused-underline= #ffffff
label-focused-padding = 3

; unfocused = Inactive workspace on any monitor
label-unfocused = %icon%
label-unfocused-padding = 3

; visible = Active workspace on unfocused monitor
label-visible = %icon%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}

; urgent = Workspace with urgency hint set
label-urgent = %icon%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2

; Separator in between workspaces
; label-separator = |


[module/mpd]
type = internal/mpd
format-online = <label-song>  <icon-prev> <icon-stop> <toggle> <icon-next>

icon-prev = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 

label-song-maxlen = 25
label-song-ellipsis = true

[module/date]
type = internal/date
interval = 5

date =
date-alt = " %Y-%m-%d"

time = " %H:%M"
time-alt = %H:%M:%S

format-prefix =   
format-prefix-foreground = ${colors.background-alt}
format-underline = #ffffff

label = %date% %time%

[module/pulseaudio]
type = internal/pulseaudio

format-volume = <label-volume>
label-volume =   %percentage%%
label-volume-foreground = ${root.foreground}
label-volume-underline = #ffffff

label-muted = 🔇 muted
label-muted-foreground = #666

format-underline = ${colors.four}


[module/cmus]
type = custom/script

exec = ~/.config/polybar/cmus.sh
exec-if = pgrep -x cmus
interval = 1

;click-left = cmus-remote --next
;click-right = cmus-remote --prev
;click-middle = cmus-remote --pause
;scroll-up = cmus-remote --volume +5%
;scroll-down = cmus-remote --volume -5%

label-font = 10
#format-prefix =  Now Playing
format =      <label>
format-prefix-foreground = #333b46
label-foreground = #ffffff
format-underline = #ffffff
format-background = #333b46
;format-underline = ${colors.foreground-alt}
label = %output%
label-maxlen = 100

[global/wm]
margin-top = 0
margin-bottom = 0

; vim:ft=dosini
